var n = getApp();

Page({
    data: {},
    quitTeam: function() {
        n.network.post({
            url: n.url.exitTeam,
            params: {},
            before: function() {
                wx.showNavigationBarLoading();
            },
            success: function(t) {
                n.util.showToast(t.data.message), 1 == t.data.result && setTimeout(function() {
                    wx.navigateBack({
                        delta: 2
                    });
                }, 1200);
            },
            fail: function() {
                n.util.showToast("获取团队信息失败");
            },
            complete: function() {
                wx.hideNavigationBarLoading(), wx.stopPullDownRefresh();
            }
        });
    },
    clickQuit: function(t) {
        var o = this, a = wx.getStorageSync(n.storage.teamInfo);
        console.log(a), wx.showModal({
            title: "提示",
            content: "确定要退出" + a.name + "？",
            success: function(n) {
                n.confirm && o.quitTeam();
            }
        });
    },
    clickPrivite: function(n) {
        wx.navigateTo({
            url: "teamPrivate/teamPrivate"
        });
    },
    onLoad: function(n) {},
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});